package com.zoe.app.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Zoe.Zhang
 * @date 2021/10/07
 * @description
 */
@RestController
public class HelloController {
    @GetMapping("/hello")
    public void hello(Model model) {
        // 获取全局的ModelAndView参数
        Object info = model.getAttribute("info");
        Map<String, String> info1 = (Map<String, String>) info;
        info1.forEach((x, y) -> System.out.println(x + "===" + y));
    }
}
